package com.teame.readbaby;

import com.teame.readbaby.util.GloableParams;
import com.teame.readbaby.util.Logger;

import android.content.Intent;
import android.view.View;
import android.widget.RelativeLayout;

public class MoreActivity extends BaseActivity {

	private RelativeLayout my_account_rl;
	private RelativeLayout my_order_rl;
	private RelativeLayout address_manage_rl;
	private RelativeLayout my_favorite_rl;
	private RelativeLayout recent_browse_rl;
	private RelativeLayout helpRelLay;
	private RelativeLayout userfeedback;
	private RelativeLayout aboutRelLay;
	
	private String Tag="MoreActivity";
	
	@Override
	protected void onClickEvent(View paramView) {
		switch (paramView.getId()) {
		case R.id.my_account_rl:{
			Logger.i(TAG, "进入账户中心");
			Intent intent = new Intent(this, AccountManageActivity.class); //gyh:这个应该是账户中心
			startActivity(intent);
			//this.finish();
		}break;
		case R.id.my_order_rl:{
			Logger.i(TAG, "进入订单列表");
			Intent intent = new Intent(this, MyOrderActivity.class);
			startActivity(intent);
			//this.finish();
		}break;
		case R.id.address_manage_rl:{
			Intent intent  = new Intent(this, AddressManagerActivity.class);
			startActivity(intent);
			//this.finish();
			
		}break;
		case R.id.my_favorite_rl:{
			Logger.i(TAG, "进入收藏夹");
			Intent intent  = new Intent(this, FavouritesActivity.class);
			startActivity(intent);
			//this.finish();
			
		}break;
		case R.id.recent_browse_rl:{
			Logger.i(TAG, "进入最近浏览");
		}break;
		case R.id.helpRelLay:{
			Logger.i(TAG, "进入帮助");
		}break;
		case R.id.userfeedback:{
			Logger.i(TAG, "用户反馈");
		}break;
		case R.id.aboutRelLay:{
			Logger.i(TAG, "关于");
			
		}break;

		
		}
	}

	@Override
	protected void findViewById() {
		my_account_rl=(RelativeLayout) this.findViewById(R.id.my_account_rl);
		my_order_rl=(RelativeLayout) this.findViewById(R.id.my_order_rl);
		address_manage_rl=(RelativeLayout) this.findViewById(R.id.address_manage_rl);
		my_favorite_rl=(RelativeLayout) this.findViewById(R.id.my_favorite_rl);
		recent_browse_rl=(RelativeLayout) this.findViewById(R.id.recent_browse_rl);
		helpRelLay=(RelativeLayout) this.findViewById(R.id.helpRelLay);
		userfeedback=(RelativeLayout) this.findViewById(R.id.userfeedback);
		aboutRelLay=(RelativeLayout) this.findViewById(R.id.aboutRelLay);
	}

	@Override
	protected void loadViewLayout() {
		GloableParams.defaultIndex=5;
		setContentView(R.layout.more_activity);
	}

	@Override
	protected void processLogic() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void setListener() {
		my_account_rl.setOnClickListener(this);
		my_order_rl.setOnClickListener(this);
		address_manage_rl.setOnClickListener(this);
		my_favorite_rl.setOnClickListener(this);
		recent_browse_rl.setOnClickListener(this);
		helpRelLay.setOnClickListener(this);
		userfeedback.setOnClickListener(this);
		aboutRelLay.setOnClickListener(this);
	}
	@Override
	protected void onPause() {
		GloableParams.defaultIndex=-1;
		super.onPause();
	}
}
